#include <p24F16KA102.h>

#include "peripherals.h"

void ledBlink(void)
{
	// Initial the Ports Used
	TRISB   = 0x7EFB;         //RB2 = 0 (IC PWR, RB8 = 0 - LED Yellow, RB15 = 0 - LED Red)
	AD1PCFG = 0xFFFF;        // Set all to digital output
	ODCB    = 0x0000;         // Do not use open drain Output
	LATB    = 0x0000;         // Reset All PORT B

	for(;;)
	{
		unsigned int i;

		LED_YELLOW = OFF;
		LED_RED = ON;     // Turn On RB0
		for (i=0; i<0xffff; i++);  // Delay Loop
		LED_YELLOW = ON;
		LED_RED = OFF;     // Turn Off RB0
		for (i=0; i<0xffff; i++);  // Delay Loop
	}
}
